package com.hframe.type;

import com.sun.istack.internal.Nullable;

public class TEnum<T extends Enum> extends com.hframe.type.T<T> {

    public TEnum(Class<T> enumClass) {
        this.className = enumClass;
    }

    public TEnum(T object, Class<T> enumClass) {
        super(object, enumClass);
    }

    public TEnum(@Nullable T object) {
        super(object, (Class<T>) object.getClass());
    }

    @Override
    public String toString() {
        if (null != object) {
            return "\"" + new StringBuffer("" + object.ordinal()).append("(").append(object.toString()).append(")").toString() + "\"";
        }
        return null;
    }

}